/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dp1.pucp.Produccion.Vista;

import com.dp1.pucp.Util.Validaciones;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

/**
 *
 * @author Rodrigo
 */
public class DetalleSimulacionGUI extends javax.swing.JDialog {
    
    private JFrame padre;

    /**
     * Creates new form DetallesSimulacionGUI
     */
    public DetalleSimulacionGUI(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo(null);
    }
    
    public JFrame getPadre(){ return padre; }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnEditar4 = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        btnCerrar = new javax.swing.JButton();
        btnIniciar = new javax.swing.JButton();
        btnRegistrar = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();

        btnEditar4.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnEditar4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/checkmark.png"))); // NOI18N
        btnEditar4.setText("Asignar");
        btnEditar4.setBorderPainted(false);
        btnEditar4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnEditar4.setMaximumSize(new java.awt.Dimension(57, 29));
        btnEditar4.setMinimumSize(new java.awt.Dimension(57, 29));
        btnEditar4.setPreferredSize(new java.awt.Dimension(57, 29));
        btnEditar4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Producir Configuracion de Simulacion"));

        btnCerrar.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Logout.png"))); // NOI18N
        btnCerrar.setText("Cerrar");
        btnCerrar.setBorderPainted(false);
        btnCerrar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCerrar.setMaximumSize(new java.awt.Dimension(57, 29));
        btnCerrar.setMinimumSize(new java.awt.Dimension(57, 29));
        btnCerrar.setPreferredSize(new java.awt.Dimension(57, 29));
        btnCerrar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        btnIniciar.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnIniciar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/hombre_icono.png"))); // NOI18N
        btnIniciar.setText("Iniciar Produccion");
        btnIniciar.setBorderPainted(false);
        btnIniciar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnIniciar.setMaximumSize(new java.awt.Dimension(57, 29));
        btnIniciar.setMinimumSize(new java.awt.Dimension(57, 29));
        btnIniciar.setPreferredSize(new java.awt.Dimension(57, 29));
        btnIniciar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        btnRegistrar.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnRegistrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/selectAll.png"))); // NOI18N
        btnRegistrar.setText("Registrar Resultados");
        btnRegistrar.setBorderPainted(false);
        btnRegistrar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnRegistrar.setMaximumSize(new java.awt.Dimension(57, 29));
        btnRegistrar.setMinimumSize(new java.awt.Dimension(57, 29));
        btnRegistrar.setPreferredSize(new java.awt.Dimension(57, 29));
        btnRegistrar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jLabel2.setText("Solo registrar resultados en caso se haya terminado el proceso de producción");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(btnIniciar, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnRegistrar, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                        .addComponent(btnCerrar, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(75, 75, 75)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnCerrar, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(btnRegistrar, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btnIniciar, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)
                .addComponent(jLabel2))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(DetalleSimulacionGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(DetalleSimulacionGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(DetalleSimulacionGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(DetalleSimulacionGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                DetalleSimulacionGUI dialog = new DetalleSimulacionGUI(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    
//    public void setEstado(int estado){
//        txtEstado.setEditable(false);
//        if (estado==0){
//            txtEstado.setText("No seleccionada");
//        }
//        if (estado==1){
//            txtEstado.setText("Seleccionada");
//        }
//        if (estado==2){
//            txtEstado.setText("no Disponible");
//        }
//        if (estado==3){
//            txtEstado.setText("Proceso de Asignacion");
//        }
//        if (estado==4){
//            txtEstado.setText("Asignada");
//        }
//        if (estado==5){
//            txtEstado.setText("Disponible Produccion");
//        }
//        if (estado==6){
//            txtEstado.setText("En produccion");
//        }
//        if (estado==7){
//            txtEstado.setText("Finalizada");
//        }
//    }
    
    public void mostrarError(String msn) {
        Validaciones.mostrarMensajeErrorVal(msn);
    }
    
    //public void addAsignarListener(ActionListener ml){ this.btnAsignar.addActionListener(ml); }
    public void addIniciarListener(ActionListener ml){ this.btnIniciar.addActionListener(ml); }
    public void addRegistrarListener(ActionListener ml){ this.btnRegistrar.addActionListener(ml); }
    public void addCerrarListener(ActionListener ml){ this.btnCerrar.addActionListener(ml); }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCerrar;
    private javax.swing.JButton btnEditar4;
    private javax.swing.JButton btnIniciar;
    private javax.swing.JButton btnRegistrar;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
}
